package org.linlinjava.litemall.db.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.linlinjava.litemall.db.models.CouponUser;

import java.util.List;

public interface CouponUserService extends IService<CouponUser> {

    public Integer countCoupon(Long couponId) ;

    public Integer countUserAndCoupon(Long userId, Long couponId) ;

    public IPage<CouponUser> queryList(Long userId, Long couponId, Short status, Integer page, Integer size) ;

    public List<CouponUser> queryAll(Long userId, Long couponId) ;

    public List<CouponUser> queryAll(Long userId) ;

    public CouponUser queryOne(Long userId, Long couponId) ;


    public List<CouponUser> queryExpired() ;

    public List<CouponUser> findByOid(Long orderId);
}
